import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;
//字符串去重，只保留一个，并按顺序输出
import java.util.Scanner;

public class Test {

    public static void main(String[] args) {
        T t = new T();
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入全是字母字符的字符串：");

        String s = sc.nextLine();

        String backkk = t.test(s);

        System.out.println("处理后的字符串为："+backkk);
    }

}
class T{

    StringBuffer str = new StringBuffer();

    public boolean[] flg =new boolean[126];

    public String test(String s){

        for(char c:s.toCharArray()){

            if(!flg[c]){

                flg[c]=true;
                str.append(c);
            }

        }
        return str.toString();

    }

}